import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/bar',
    name: 'bar',
    component: ()=>import('@/views/bar.vue')
  },
  {
    path: '/chartline',
    name: 'chartline',
    component: ()=>import('@/views/chartLine.vue')
  },
  {
    path: '/radar',
    name: 'radar',
    component: ()=>import('@/views/radar.vue')
  },
  {
    path: '/ybar',
    name: 'ybar',
    component: ()=>import('@/views/chart-y-bar.vue')
  },
  {
    path: '/triangle',
    name: 'triangle',
    component: ()=>import('@/views/triangle.vue')
  },
  {
    path: '/mpies',
    name: 'mpies',
    component: ()=>import('@/views/bar-stack.vue')
  },
  {
    path: '/stackbar',
    name: 'stackbar',
    component: ()=>import('@/views/line-stack.vue')
  },
  {
    path: '/wordcloud',
    name: 'wordcloud',
    component: ()=>import('@/views/wordcloud.vue')
  },
  {
    path: '/liquidfill',
    name: 'liquidfill',
    component: ()=>import('@/views/liquidfill.vue')
  },
  {
    path: '/gl',
    name: 'echarts-gl',
    component: ()=>import('@/views/echarts-gl.vue')
  },
  {
    path: '/timeline',
    name: 'timeline',
    component: ()=>import('@/views/timeline.vue')
  },
  {
    path: '/worldmap',
    name: 'worldmap',
    component: ()=>import('@/views/worldmap.vue')
  },
  {
    path: '/nav',
    name: 'nav',
    component: ()=>import('@/views/nav.vue')
  },
  {
    path: '/worldmap2',
    name: 'worldmap2',
    component: ()=>import('@/views/worldmap2.vue')
  },
  {
    path: '/',
    name: 'index',
    component: ()=>import('@/views/index/index.vue')
  },
  // {
  //   path: '/',
  //   name: 'baidumap',
  //   component: ()=>import('@/views/mapbaidu.vue')
  // },
  // {
  //   path: '/',
  //   name: 'baidumap',
  //   component: ()=>import('@/views/mapbaidu.vue')
  // },
  {
    path: '/china',
    name: 'china',
    component: ()=>import('@/views/china.vue')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '@/views/About.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
